#include <stdio.h>
#include <string.h>
void move(int x,char arr[60])
{
	for(int i = x;i<60;i++)	
	{
		arr[i] = arr[i+1];
	}
}
int main()
{
	char arr1[60] = {0};
	scanf("%[^\n]s",arr1);	
	char flag = 0;
	
	size_t j =strlen(arr1);
	for(int m = 0;m<(int)j;m++)
	{
		flag = arr1[m];	
		if(flag == ' ')
		{
			continue;
		}
		for(int i = m+1;i<(int)j;i++)		
		{
			if(flag == arr1[i])
			{
				move(i,arr1);
			}
			if(flag != arr1[i])
			{
				continue;
			}	
			if(arr1[i] == 0)
			{
				break;
			}
		}
	}
	j =strlen(arr1);
	for(int i = 0;i<(int)j;i++)
	{
		if(arr1[i] == ' ')
		{
			continue;
		}
		printf("%c ",arr1[i]);
	}
		
	return 0;
}
